package com.azt.provider.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.azt.api.pojo.ProCategorySeo;
import com.azt.api.service.ProCategorySeoService;
import com.azt.provider.mapper.ProCategorySeoMapper;

@Service
@Transactional
public class ProCategorySeoServiceImpl  implements ProCategorySeoService{
    @Autowired
	private ProCategorySeoMapper proCategorySeoMapper;
	
	@Override
	public ProCategorySeo getProCategorySeo(Integer categoryId) {
		ProCategorySeo pcs=new ProCategorySeo();
		pcs.setCategoryId(categoryId);
		return proCategorySeoMapper.selectOne(pcs);
	}

	@Override
	public void saveOrUpdate(ProCategorySeo proCategorySeo) {
		if(proCategorySeo.getId()!=null){
			proCategorySeoMapper.updateByPrimaryKeySelective(proCategorySeo);
		}else{
			proCategorySeoMapper.insertSelective(proCategorySeo);
		}
	}

}
